#ifndef _CANCONTROLLER_RECVTHREAD_H_
#define _CANCONTROLLER_RECVTHREAD_H_

#include <QThread>
#include <QByteArray>
#include "PubStruct.h"

class CRecvThread : public QThread
{
	Q_OBJECT
public:
	CRecvThread(CInitParameter arg, QThread* parent = nullptr);
	~CRecvThread();
	void stopRecv();

signals:
	void sigRecvData(unsigned long deviceIndex, unsigned long canIndex
		, unsigned int msgId, unsigned char remoteFlag
		, unsigned char externFlag, QByteArray data, unsigned int timeStamp);

private:
	void run();

private:
	CInitParameter m_arg;
	bool m_bIsRecv;
};
#endif
